<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:view>
        <h:head>
            <f:event type="preRenderView" listener="#{loginBean.preRenderView}"/>
            <ui:include src="creatively-html-head.xhtml">
                <ui:param name="pageTitle" value="#{pageTitle}"/>
            </ui:include>

            <ui:insert name="headscripts"/>

            <ui:insert name="headstyles"/>
        </h:head>
        <h:body>

            <!-- Wrapper begin -->
            <div id="wrapper" class="clearfix">

                <!-- Header -->
                <header>
                    <ui:include src="creatively-page-head.xhtml">
                        <ui:param name="webSiteTitle" value="#{webSiteTitle}"/>
                    </ui:include>
                </header>

                <!-- Container begin -->
                <div class="container_12">

                    <!-- MAIN CONTENT BEGIN -->

                    <!-- Page title -->
                    <section id="title">
                        <!-- Heading -->
                        <h1 class="grid_10" style="line-height: 20px;"><span>#{pageTitle}</span></h1>
                        <span style="float: right; dosplay: block; line-height: 20px; height: 20px; width: 140px; text-align: right;">
                            <h:form><h:commandLink class="button_grey" style="text-decoration: none;" title="End session: #{loginBean.currentUser.name} #{loginBean.currentUser.surname}" value="Sign out" action="#{loginBean.logOut}"/></h:form>
                        </span>
                        <!-- Submenu -->
                        <nav class="grid_7" style="display: block; width: 100%;">
                            <ui:insert name="submenu"/>
                        </nav>

                    </section>

                    <!-- Typography -->
                    <section class="text grid_12">
                        <ui:insert name="content"/>
                    </section> 

                    <!-- MAIN CONTENT END -->

                    <!-- Container end --></div>

                <!-- Wrapper end --></div>

            <!-- Footer -->
            <footer>
                <ui:include src="creatively-footer.xhtml"/>
            </footer>

            <!-- Load main script -->
            <script src="js/script.js"></script>

            <!-- Load Nivo Slider -->
            <script src="js/libs/jquery.nivo.slider.pack.js"></script>

            <!-- Load Fancybox -->
            <script src="js/libs/jquery.fancybox-1.3.4.pack.js"></script>

            <!-- Load Twitter news stream -->
            <script src="js/libs/jquery.tweet.js"></script>


            <!-- Customization -->
            <ui:include src="creatively-bottom-scripts.xhtml"/>

        </h:body>
    </f:view>
</html>

